import request from '@/utils/request'

export function insertProject(data) {
  return request({
    url: '/project/insertProject',
    method: 'post',
    data
  })
}

export function getProject(data) {
  return request({
    url: '/project/getProject',
    method: 'post',
    data
  })
}

// 修改项目信息
export function updateProject(data) {
  return request({
    url: '/project/updateProject',
    method: 'post',
    data
  })
}

// 搜索项目
export function searchProject(data) {
  return request({
    url: '/project/searchProject',
    method: 'post',
    data
  })
}

// 搜索项目分页
export function searchProjectPage(val, data) {
  return request({
    url: '/project/searchProject?page=' + val,
    method: 'post',
    data
  })
}

// 导出项目数据
export function exportProject(data) {
  return request({
    url: '/project/exportProject',
    method: 'post',
    data
  })
}

// 获取项目列表
export function getProjectPage(val, data) {
  return request({
    url: '/project/getProject?page=' + val,
    method: 'post',
    data
  })
}

// 删除项目
export function deleteProject(data) {
  return request({
    url: '/project/deleteProject',
    method: 'post',
    data
  })
}

// 批量删除
export function batchDeleteProject(data) {
  return request({
    url: '/project/batchDeleteProject',
    method: 'post',
    data
  })
}

// 筛选项目分页
export function selectProjectPage(val, data) {
  return request({
    url: '/project/selectProject?page=' + val,
    method: 'post',
    data
  })
}
// 筛选项目
export function selectProject(data) {
  return request({
    url: '/project/selectProject',
    method: 'post',
    data
  })
}

// 分公司获取审核通过的项目
export function branchGetProject() {
  return request({
    url: '/project/branchGetProject',
    method: 'get'
  })
}

// 根据id查询项目详细
export function getProjectDetail(data) {
  return request({
    url: '/project/getProjectDetail',
    method: 'post',
    data
  })
}

// 下载文件
export function downloadFile(data) {
  return request({
    url: '/project/downloadFile',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 提交投标信息
export function insertTenderInfo(data) {
  return request({
    url: '/project/insertTenderInfo',
    method: 'post',
    data
  })
}
// 提交签约信息
export function insertSigningInfo(data) {
  return request({
    url: '/project/insertSigningInfo',
    method: 'post',
    data
  })
}
// 科员审核
export function clerkAudit(data) {
  return request({
    url: '/project/clerkAudit',
    method: 'post',
    data
  })
}
// 科长审核
export function sectionAudit(data) {
  return request({
    url: '/project/sectionAudit',
    method: 'post',
    data
  })
}

// 项目评价
export function insertEvaluation(data) {
  return request({
    url: '/project/insertEvaluation',
    method: 'post',
    data
  })
}

// 项目评价查询
export function selectEvaluation(data) {
  return request({
    url: '/project/selectEvaluation',
    method: 'post',
    data
  })
}

// 项目审核状态列表查询
export function selectStatus(data) {
  return request({
    url: '/project/selectStatus',
    method: 'post',
    data
  })
}

// 项目提交审核
export function submitAudits(data) {
  return request({
    url: '/project/submitAudits',
    method: 'post',
    data
  })
}

// 项目签约审核
export function signAudit(data) {
  return request({
    url: '/project/signAudit',
    method: 'post',
    data
  })
}

// 获取分公司筛选框信息
export function getBranchInfo() {
  return request({
    url: '/project/getBranchInfo',
    method: 'get'
  })
}

// 填写待投标信息
export function insertStayTenderInfo(data) {
  return request({
    url: '/project/insertStayTenderInfo',
    method: 'post',
    data
  })
}

// 填写待筹备信息
export function insertStayPreparation(data) {
  return request({
    url: '/project/insertStayPreparation',
    method: 'post',
    data
  })
}
